<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>微信界面分享</title>
<script type="text/javascript"
	src="static/plugins/jquery/jquery-1.8.3.min.js"></script>
</head>
<body>
	分享测试
	
	<table width="100%" cellspacing="0" cellpadding="0">
        <tr><td width="20%">属性</td><td width="80%">值</td></tr>
        <tr><td>OpenID</td><td>${(user.openId)!}</td></tr>
        <tr><td>昵称</td><td>${(user.nickname)!}</td></tr>
        <tr><td>性别</td><td>${(user.sex)!}</td></tr>
        <tr><td>国家</td><td>${(user.country)!}</td></tr>
        <tr><td>省份</td><td>${(user.province)!}</td></tr>
        <tr><td>城市</td><td>${(user.city)!}</td></tr>
        <tr><td>头像</td><td><img src="${(user.headImgUrl)!}" /></td></tr>
        <tr><td>特权</td><td>
        	<#if (user.privilegeList)??>
        		<#list user.privilegeList as pri>
        			${pri!}
        		</#list>
        	</#if>
        </td></tr>
        <tr><td>state:</td><td>${state!}</td></tr>
        <tr>
        	<input type="button" text="签到" onclick="submit()"/>
        </tr>
    </table>
    <script type="text/javascript">
    	function submit() {
    		var data = {
    				openId:'${(user.openId)!}',
    				nickname:'${(user.nickname)!}',
    				sex:'${(user.sex)!}',
    		        country:'${(user.country)!}',
    		        province:'${(user.province)!}',
    		        city:'${(user.city)!}',
    		        headImgUrl:'${(user.headImgUrl)!}'
    		};
    		$.ajax({
    			type : "POST",
    			url : "getWxInfo.action",
    			data : data, //序列化   
    			dataType:'json',
    			error : function(request) { // 设置表单提交出错 
    				alert('签到失败');
    			},
    			success : function(data) {
    				alert('签到成功');
    			}
    		});
    	}
    </script>
	<#include "footer.html">
</body>
</html>